Home | Trees | Index | Help |
|
---|
Module SocketServer :: Class BaseServer |
|
TCPServer
Base class for server classes. Methods for the caller: - __init__(server_address, RequestHandlerClass) - serve_forever() - handle_request() # if you do not use serve_forever() - fileno() -> int # for select() Methods that may be overridden: - server_bind() - server_activate() - get_request() -> request, client_address - verify_request(request, client_address) - server_close() - process_request(request, client_address) - close_request(request) - handle_error() Methods for derived classes: - finish_request(request, client_address) Class variables that may be overridden by derived classes or instances: - address_family - socket_type - allow_reuse_address Instance variables: - RequestHandlerClass - socket
Method Summary | |
---|---|
Constructor. | |
Called to clean up an individual request. | |
Finish one request by instantiating RequestHandlerClass. | |
Handle an error gracefully. | |
Handle one request, possibly blocking. | |
Call finish_request. | |
Handle one request at a time until doomsday. | |
Called by constructor to activate the server. | |
Called to clean-up the server. | |
Verify the request. |
Method Details |
---|
__init__(self,
server_address,
RequestHandlerClass)
Constructor. May be extended, do not override.
|
close_request(self, request)Called to clean up an individual request. |
finish_request(self, request, client_address)Finish one request by instantiating RequestHandlerClass. |
handle_error(self, request, client_address)Handle an error gracefully. May be overridden. The default is to print a traceback and continue. |
handle_request(self)Handle one request, possibly blocking. |
process_request(self, request, client_address)Call finish_request. Overridden by ForkingMixIn and ThreadingMixIn. |
serve_forever(self)Handle one request at a time until doomsday. |
server_activate(self)Called by constructor to activate the server. May be overridden. |
server_close(self)Called to clean-up the server. May be overridden. |
verify_request(self, request, client_address)Verify the request. May be overridden. Return True if we should proceed with this request. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jul 27 17:40:03 2007 | http://epydoc.sf.net |